<?php 
	$this->assign('button_save_template','<a href="javascript:void(0)" class="btn btn-sm btn-info" onclick="ShowModel();"><i class="fa fa-fw fa-plus"></i> NEW TEMPLATE</a>');
	$this->Html->css(array('select2', 'font', 'app.v2', 'prettyPhoto', ), array('inline' => false));
	$this->Html->script(array(
	'app.v2', 'fuelux/fuelux', 'datepicker/bootstrap-datepicker',
	'slider/bootstrap-slider', 'file-input/bootstrap.file-input',
	'combodate/moment.min', 'combodate/combodate', 'parsley/parsley.min',
	'select2/select2.min', 'prettyphoto/jquery.prettyPhoto', 'grid/jquery.grid-a-licious.min', 'grid/gallery'), array('inline' => false));
?>
<section id="content">
	<section class="main">
		<div class="col-lg-12">
			<div class="clearfix">
				<h4><i class="fa fa-magic"></i>Components</h4>
			</div>
			<ul class="breadcrumb">
				<li><a href="#"><i class="fa fa-home"></i>Home</a></li>
				<li><a href="#"><i class="fa fa-list-ul"></i>Elements</a></li>
				<li class="active">Components</li>
			</ul>
		</div>
		<div class="col-lg-4">
			<div class="input-group">
				<select id="select2-option" style="width: 100%; height: 34px">
					<optgroup label="Alaskan/Hawaiian Time Zone">
						<option value="AK">Alaska</option>
						<option value="HI">Hawaii</option>
					</optgroup>
					<optgroup label="Pacific Time Zone">
						<option value="CA">California</option>
						<option value="NV">Nevada</option>
						<option value="OR">Oregon</option>
						<option value="WA">Washington</option>
					</optgroup>
					<optgroup label="Mountain Time Zone">
						<option value="AZ">Arizona</option>
						<option value="CO">Colorado</option>
						<option value="ID">Idaho</option>
						<option value="MT">Montana</option>
						<option value="NE">Nebraska</option>
						<option value="NM">New Mexico</option>
						<option value="ND">North Dakota</option>
						<option value="UT">Utah</option>
						<option value="WY">Wyoming</option>
					</optgroup>
					<optgroup label="Central Time Zone">
						<option value="AL">Alabama</option>
						<option value="AR">Arkansas</option>
						<option value="IL">Illinois</option>
						<option value="IA">Iowa</option>
						<option value="KS">Kansas</option>
						<option value="KY">Kentucky</option>
						<option value="LA">Louisiana</option>
						<option value="MN">Minnesota</option>
						<option value="MS">Mississippi</option>
						<option value="MO">Missouri</option>
						<option value="OK">Oklahoma</option>
						<option value="SD">South Dakota</option>
						<option value="TX">Texas</option>
						<option value="TN">Tennessee</option>
						<option value="WI">Wisconsin</option>
					</optgroup>
					<optgroup label="Eastern Time Zone">
						<option value="CT">Connecticut</option>
						<option value="DE">Delaware</option>
						<option value="FL">Florida</option>
						<option value="GA">Georgia</option>
						<option value="IN">Indiana</option>
						<option value="ME">Maine</option>
						<option value="MD">Maryland</option>
						<option value="MA">Massachusetts</option>
						<option value="MI">Michigan</option>
						<option value="NH">New Hampshire</option>
						<option value="NJ">New Jersey</option>
						<option value="NY">New York</option>
						<option value="NC">North Carolina</option>
						<option value="OH">Ohio</option>
						<option value="PA">Pennsylvania</option>
						<option value="RI">Rhode Island</option>
						<option value="SC">South Carolina</option>
						<option value="VT">Vermont</option>
						<option value="VA">Virginia</option>
						<option value="WV">West Virginia</option>
					</optgroup>
				</select>  
				<span class="input-group-btn">
					<button class="btn btn-warning" type="button">Go!</button>
				</span>
			</div>
		</div>
		<div class="col-lg-4">
			<div class="input-group">
				<input class="form-control datepicker" size="16" type="text" value="12-02-2013" data-date-format="dd-mm-yyyy" style="width: 100%; height: 34px">
				<span class="input-group-btn">
					<button class="btn btn-inverse" type="button">Go!</button>
				</span>
			</div>
		</div>
		<div class="col-lg-4">
			<div class="input-group">
				<input type="text" placeholder="Input your comment here" class="form-control">
				<span class="input-group-btn">
					<button class="btn btn-primary" type="button">Go!</button>
				</span>
			</div>
		</div>
		<div class="clearfix"></div>
		<div class=" m-t">
			<div id="gallery" class="gallery hide">				
				<?php foreach($templates as $template): ?>
				<div class="item">
					<?php 					
						$full = '/theme/BackEnd/img/templates/' . $template['Template']['id'] . '.png';
						$thumb = $this->Html->image( 'templates/' . $template['Template']['id'] . '.png' );
						echo $this->Html->link($thumb,$full,array('escape' => false, 'rel' => 'prettyPhoto[gallery]', 'class' => 'item-media'));
					?>
					<div class="desc" style="text-align:center">
						<h4><?php echo $template['Template']['name'] ;?></h4>
						<a href="javascript:void(0)" class="btn btn-sm btn-info" onclick="ShowModel(<?php echo $template['Template']['id'] ;?>);"><i class="fa fa-fw fa-plus"></i> Copy</a>
					<?php echo $this->Html->link('<i class="fa fa-fw fa-plus"></i> Edit', array('controller' => 'templates', 'action' => 'admin_app', $template['Template']['id']), array('class' => 'btn btn-sm btn-info', 'escape' => false)) ;?>
					</div>
				</div>
				<?php endforeach; ?>
			</div>
		</div>
	</section>
</section>
<div class="clearfix"></div>
<div class="text-center padder clearfix">
	<ul class="pagination pagination-small m-t-none m-b-none">
	<?php
		echo $this->Paginator->prev(__('prev'), array('tag' => 'li'), null, array('tag' => 'li','class' => 'disabled','disabledTag' => 'a'));
		echo $this->Paginator->numbers(array('separator' => '','tag' => 'li', 'currentTag' => 'a', 'currentClass' => 'active')); 
		echo $this->Paginator->next(__('next'), array('tag' => 'li','currentClass' => 'disabled'), null, array('tag' => 'li','class' => 'disabled','disabledTag' => 'a'));
	?>
	</ul>
</div>
<div class="clearfix"></div>
























